home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / HPVGI / OEMSETUP.INF < prev   
Encoding:
INI File  |  1996-07-31  |  30.1 KB  |  843 lines

  1. [Identify]
  2.     Debug-Output "HP: Identify."
  3.     read-syms Identification
  4.     set Status     = STATUS_SUCCESSFUL
  5.     set Identifier = $(OptionType)
  6.     set Media      = #("Source Media Descriptions", 1, 1)
  7.     Return $(Status) $(Identifier) $(Media)
  8.  
  9. [Identification]
  10.     OptionType = NetAdapter
  11. [PlatformsSupported]
  12.     ISA
  13.     EISA
  14.     "Jazz-Internal Bus"
  15. [Options]
  16. J2573A
  17. [FileConstants]
  18. UtilityInf      = "UTILITY.INF"
  19. ParamInf        = "NCPARAM.INF"
  20. subroutineinf   = "SUBROUTN.INF"
  21. SoftwareType    = "driver"
  22. Exit_Code       = 0
  23. DialogDllName   = "hpvgdlg.dll"
  24. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  25. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  26. Manufacturer    = "Hewlett-Packard"
  27. ProductMajorVersion     = "3"
  28. ProductMinorVersion     = "1"
  29. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  30. ProductSoftwareName     = "Hpddnd3"
  31. ProductSoftwareTitle    = "HP DeskDirect 10/100 LAN Adapter Driver"
  32. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\hpddnd3.sys"
  33. NetRuleSoftwareType     = "hpddnd3Sys ndisDriver hpddnd3Driver"
  34. NetRuleSoftwareUse      = $(SoftwareType)
  35. NetRuleSoftwareBindForm = """Hpddnd3Sys"" yes no container"
  36. NetRuleSoftwareClass    = {"hpddnd3Driver basic"}
  37. NetRuleSoftwareBindable = {"hpddnd3Driver hpddnd3Adapter non exclusive 100"}
  38. ProductHardwareName     = "Hpddnd3"
  39. ProductHardwareJ2573ATitle = "HP J2573A"
  40. NetRuleHardwareType     = "hpddnd3 hpddnd3Adapter"
  41. NetRuleHardwareBindForm = " yes yes container"
  42. NetRuleHardwareClass    = {"hpddnd3Adapter basic"}
  43. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  44. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  45. [GeneralConstants]
  46. from      = ""
  47. to        = ""
  48. ExitCodeOk     = 0
  49. ExitCodeCancel = 1
  50. ExitCodeFatal  = 2
  51. KeyNull         = ""
  52. MAXIMUM_ALLOWED   = 33554432
  53. RegistryErrorIndex = NO_ERROR
  54. KeyProduct      = ""
  55. KeyParameters   = ""
  56. TRUE            = 1
  57. FALSE           = 0
  58. NoTitle            = 0
  59. ExitState   = "Active"
  60. OldVersionExisted = $(FALSE)
  61. DriverPath      = $(!STF_NTPATH)\drivers
  62. [date]
  63.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  64.  
  65. [ReturnOptions]
  66.     Debug-Output "HP: ReturnOptions."
  67.     set Status        = STATUS_FAILED
  68.     set OptionList     = {}
  69.     set OptionTextList = {}
  70.     set LanguageList = ^(LanguagesSupported, 1)
  71.     Ifcontains(i) $($0) in $(LanguageList)
  72.         ifstr(i) $($1) == ""
  73.                         goto returnoptions
  74.         endif
  75.         set PlatformList = ^(PlatformsSupported, 1)
  76.         Ifcontains(i) $($1) in $(PlatformList)
  77.                         goto returnoptions
  78.         else
  79.                         set Status = STATUS_NOTSUPPORTED
  80.                         goto finish_ReturnOptions
  81.         endif
  82.     else
  83.                 set Status = STATUS_NOLANGUAGE
  84.                 goto finish_ReturnOptions
  85.     endif
  86. returnoptions = +
  87.     set OptionList     = ^(Options, 1)
  88.     set OptionTextList = ^(OptionsText$($0), 1)
  89.     set Status         = STATUS_SUCCESSFUL
  90.     Debug-Output "HP: ReturnOptions successful."
  91. finish_ReturnOptions = +
  92.     Return $(Status) $(OptionList) $(OptionTextList)
  93.  
  94. [InstallOption]
  95.     set Status   = STATUS_FAILED
  96.     set Option   = $($1)
  97.     set SrcDir   = $($2)
  98.     set AddCopy  = $($3)
  99.     set DoCopy   = $($4)
  100.     set DoConfig = $($5)
  101.     set LanguageList = ^(LanguagesSupported, 1)
  102.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  103.         Return STATUS_NOLANGUAGE
  104.     endif
  105.     set-subst LF = "\n"
  106.     read-syms GeneralConstants
  107.     read-syms FileConstants
  108.     read-syms DialogConstants$(!STF_LANGUAGE)
  109.     ifstr(i) $(!NTN_Origination) == "NCPA"
  110.         set Continue = "OK"
  111.     endif
  112.     read-syms FileConstants$(!STF_LANGUAGE)
  113.     detect date
  114.     set-title  $(FunctionTitle)
  115.     set to   = Begin
  116.     set from = Begin
  117.     set CommonStatus = STATUS_SUCCESSFUL
  118.     EndWait
  119. Begin = +
  120.     Set ActivateDetection = FALSE
  121.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  122.         set StartLabel = removeadapter
  123.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  124.         set StartLabel = UpgradeSoftware
  125.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  126.         set StartLabel = bindingadapter
  127.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  128.         set StartLabel = configureadapter
  129.         Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  130.             Debug-Output "Cannot configure the Hpddnd3 driver software."
  131.             Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  132.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  133.                 Debug-Output "ShellCode error: cannot get an error string."
  134.                 goto ShellCodeError
  135.             endif
  136.             set Error = $($R0)
  137.             set from = end
  138.             set to = end
  139.             goto nonfatalinfo
  140.         endif
  141.     else
  142.         set StartLabel = installadapter
  143.         set OEM_ABANDON_OPTIONS = {}
  144.         set OEM_ABANDON_SOFTWARE = FALSE
  145.         set OEM_ABANDON_ON = TRUE
  146.     endif
  147.     Debug-Output "OEMSETUP.INF: =================================================="
  148.     Debug-Output "OEMSETUP.INF: STF_CWDIR is: "$(!STF_CWDIR)
  149.     Debug-Output "OEMSETUP.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  150.     Debug-Output "OEMSETUP.INF: Option is: "$(Option)
  151.     Debug-Output "OEMSETUP.INF: =================================================="
  152.     Set DetectedCard = FALSE
  153.     Goto $(StartLabel)
  154. installadapter = +
  155.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  156.     Ifstr $(KeyProduct) != $(KeyNull)
  157.         CloseRegKey $(KeyProduct)
  158.         ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  159.            Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  160.                $(ProductVersion)
  161.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  162.                Debug-Output "ShellCode error: cannot get an error string."
  163.                goto ShellCodeError
  164.            endif
  165.            goto end
  166.         else
  167.            Shell $(UtilityInf), CardExistedDlg
  168.            ifint $($ShellCode) != $(!SHELL_CODE_OK)
  169.                Debug-Output "ShellCode error: cannot get an error string."
  170.                goto ShellCodeError
  171.            endif
  172.            ifstr(i) $($R1) != "OK"
  173.                goto end
  174.            endif
  175.            set OldVersionExisted = $(TRUE)
  176.         endif
  177.     endif
  178.     Set CurrParamSettings = {}
  179.     set   OldSource =  $(!STF_SRCDIR)
  180.     Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(!STF_SRCDIR)
  181.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  182.           Goto fatal
  183.     Else-Ifstr(i) $($R0) == STATUS_FAILED
  184.           Goto fatal
  185.     Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  186.           Goto installstep1
  187.     Endif
  188.     Set !STF_SRCDIR = $($R1)
  189.     install "Install-Dll"
  190.     Set !STF_SRCDIR = $(OldSource)
  191. ;Set Defaults
  192.     set IRQValue = *($(IRQList), $($(Option)IRQDefault))
  193.     set IOBaseAddrValue = *($(IOBaseAddrList), $($(Option)IOBaseAddrDefault))
  194. ;    set MemoryMapValue = *($(MemoryMapList), $($(Option)MemoryMapDefault))
  195.     Goto adaptersetup
  196. configureadapter = +
  197.     Ifstr $(KeyProduct) == $(KeyNull)
  198.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  199.         Ifstr $(KeyProduct) == $(KeyNull)
  200.             set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  201.             Debug-Output "Cannot find component product key"
  202.             goto fatalregistry
  203.         Endif
  204.     Endif
  205.     Debug-Output "INF: Shelling to FindService"
  206.     Shell $(UtilityInf) FindService, $(KeyProduct)
  207.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  208.         Debug-Output "INF: FindService shell failure"
  209.         Goto ShellCodeError
  210.     Endif
  211.     Ifstr(i) $($R0) != NO_ERROR
  212.         Debug-Output "INF: FindService Shell error: "$($R0)
  213.         Goto fatalregistry
  214.     endif
  215.     Set KeyParameters = $($R2)
  216.     CloseRegKey $($R1)
  217.     Ifstr $(KeyParameters) == $(KeyNull)
  218.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  219.         Debug-Output "Cannot find component service"
  220.         goto fatalregistry
  221.     endif
  222.     set OldVersionExisted = $(TRUE)
  223.     set ValueName = ""
  224.     set ValueData = ""
  225.     set ValueStr  = ""
  226.     set ValueList = {}
  227.     EnumRegValue $(KeyParameters) ValueList
  228.  
  229.     ForListDo $(ValueList)
  230.     set ValueItem = $($)
  231.     set ValueName = *($(ValueItem),1)
  232.     set ValueData = *($(ValueItem),4)
  233.     ifstr(i) $(ValueName) == "InterruptNumber"
  234.         set IRQValueIndex = $(ValueData)
  235.     else-ifstr(i) $(ValueName) == "IoBaseAddress"
  236.         set IOBaseAddrIndex = $(ValueData)
  237. ;        else-ifstr(i) $(ValueName) == "MemoryMappedBaseAddress"
  238. ;        set MemoryMapIndex = $(ValueData)
  239.     endif
  240.  
  241.     EndForListDo
  242.  
  243.     set IRQValue = *($(IRQList), ~($(IRQValues),$(IRQValueIndex)))
  244.     ifstr(i) $(IRQValue) == ""
  245.     set IRQValue = *($(IRQList), 2)
  246.     endif
  247.  
  248.  
  249. ;    set MemoryMapValue = *($(MemoryMapList), ~($(MemoryMapValues),$(MemoryMapIndex)))
  250. ;    ifstr(i) $(MemoryMapValue) == ""
  251. ;    set MemoryMapValue = *($(MemoryMapList), 2)
  252. ;    endif
  253.  
  254.  
  255.     set IOBaseAddrValue = *($(IOBaseAddrList), ~($(IOBaseAddrValues),$(IOBaseAddrIndex)))
  256.  
  257.     ifstr(i) $(IOBaseAddrValue) == ""
  258.     set IOBaseAddrValue = *($(IOBaseAddrList), 1)
  259.     endif
  260.  
  261. adaptersetup = +
  262.     Shell "" DebugConfiguration "before displaying dialog"
  263.     Set from = adapteroptions
  264.     goto adapteroptions
  265. adapteroptions = +
  266.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  267.     LoadLibrary "Disk 1" $(DialogDllName) !hLib
  268.     ui start "InputDlg"  $(!hLib)
  269.     FreeLibrary $(!hLib)
  270.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  271.                 set IRQValueIndex = $(Combo1Out)
  272.                 set IOBaseAddrIndex = $(Combo2Out)
  273. ;                set MemoryMapIndex = $(Combo3Out)
  274.                 ui pop 1
  275.                 goto nextstep
  276.     else-ifstr(i) $(DLGEVENT) == "BACK"
  277.                 set CommonStatus = STATUS_USERCANCEL
  278.                 Debug-Output "Action: exit. Bye."
  279.                 ui pop 1
  280.                 goto end
  281.     else
  282.                 ui pop 1
  283.                 Debug-Output "Action: unknown. Bye."
  284.                 goto end
  285.     endif
  286. nextstep = +
  287.     Shell "" DebugConfiguration "after running dialog"
  288.     Set from = adapteroptions
  289.     Set to = skipoptions
  290.     goto skipoptions
  291. skipoptions =+
  292.     ifint $(OldVersionExisted) == $(TRUE)
  293.         ifstr(i) $(!NTN_InstallMode) == configure
  294.             goto writeparameters
  295.         endif
  296.     endif
  297.     StartWait
  298.     ifint $(OldVersionExisted) == $(FALSE)
  299.         ifstr(i) $(!NTN_InstallMode) == "install"
  300.            Ifstr(i) $(DoCopy) == "YES"
  301.               Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  302.               Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  303.                   Goto ShellCodeError
  304.               Else-Ifstr(i) $($R0) == STATUS_FAILED
  305.                   Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  306.                   ifint $($ShellCode) != $(!SHELL_CODE_OK)
  307.                       goto ShellCodeError
  308.                   endif
  309.                   set Error = $($R0)
  310.                   Goto fatal
  311.               Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  312.                   Goto successful
  313.               Endif
  314.               Set SrcDir = $($R1)
  315.            Endif
  316.            install "Install-Option"
  317.            ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  318.               Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  319.               ifint $($ShellCode) != $(!SHELL_CODE_OK)
  320.                   goto ShellCodeError
  321.               endif
  322.               set Error = $($R0)
  323.               goto fatal
  324.            endif
  325.         endif
  326.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  327.             $(ProductSoftwareName), +
  328.             $(ProductSoftwareName), +
  329.             $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  330.             $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  331.             $(NetEventDLL)
  332.         Set OEM_ABANDON_SOFTWARE = TRUE
  333.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  334.             Debug-Output "ShellCode error"
  335.             goto ShellCodeError
  336.         endif
  337.         set RegistryErrorIndex = $($R0)
  338.         set KeyProduct      = $($R1)
  339.         Set SoftNetRulesKey = $($R2)
  340.         CloseRegKey $($R3)
  341.         CloseRegKey $($R4)
  342.         CloseRegKey $($R5)
  343.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  344.             EndWait
  345.             Debug-Output "Registry error: add software components"
  346.             CloseRegKey $(KeyProduct)
  347.             CloseRegKey $(SoftNetRulesKey)
  348.             goto fatalregistry
  349.         endif
  350.         set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  351.                            {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  352.                            {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  353.                            {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  354.                            {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  355.                            {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  356.                            {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  357.         Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  358.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  359.             Debug-Output "ShellCode error."
  360.             goto ShellCodeError
  361.         endif
  362.         set RegistryErrorIndex = $($R0)
  363.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  364.             EndWait
  365.             Debug-Output "Registry error: add value list."
  366.             CloseRegKey $(KeyProduct)
  367.             CloseRegKey $(SoftNetRulesKey)
  368.             goto fatalregistry
  369.         endif
  370.         set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  371.                             {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  372.                             {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  373.                             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  374.                             {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  375.                             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  376.         Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  377.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  378.             Debug-Output "ShellCode error."
  379.             goto ShellCodeError
  380.         endif
  381.         set RegistryErrorIndex = $($R0)
  382.         CloseRegKey $(KeyProduct)
  383.         CloseRegKey $(SoftNetRulesKey)
  384.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  385.             EndWait
  386.             Debug-Output "Registry error: add value list."
  387.             goto fatalregistry
  388.         endif
  389.     endif
  390.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  391.     ifint $($R4) != -1
  392.         Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  393.     endif
  394.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  395.         Debug-Output "Cannot add hardware component"
  396.         goto ShellCodeError
  397.     endif
  398.     set RegistryErrorIndex = $($R0)
  399.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  400.         EndWait
  401.         Debug-Output "Registry error: add hardware component"
  402.         CloseRegKey $($R1)
  403.         CloseRegKey $($R2)
  404.         CloseRegKey $($R3)
  405.         goto fatalregistry
  406.     endif
  407.     set KeyParameters = $($R3)
  408.     set KeyAdapterRules = $($R2)
  409.     set AdapterNumber = $($R4)
  410.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  411.                        {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  412.                        {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  413.                        {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  414.                        {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  415.                        {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  416.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  417.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  418.         Debug-Output "ShellCode error"
  419.         goto ShellCodeError
  420.     endif
  421.     CloseRegKey $($R1)
  422.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  423.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  424.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  425.                         {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  426.                         {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  427.                         {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  428.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  429.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  430.         Debug-Output "ShellCode error."
  431.         goto ShellCodeError
  432.     endif
  433.     set RegistryErrorIndex = $($R0)
  434.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  435.         EndWait
  436.         Debug-Output "Registry error: add value list."
  437.         CloseRegKey $(KeyParameters)
  438.         CloseRegKey $(KeyAdapterRules)
  439.         goto fatalregistry
  440.     endif
  441.     CloseRegKey $(KeyAdapterRules)
  442.     goto writeparameters
  443. writeparameters = +
  444.     Shell $(UtilityInf), GetBusTypeNum
  445.     set BusTypeNum = $($R1)
  446.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  447.         Debug-Output "ShellCode error."
  448.         goto ShellCodeError
  449.     endif
  450.  
  451. ;Get BusNumber
  452.     set BusNumber = 0
  453.  
  454.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_SoftwareBase)"\Microsoft\Windows Nt\CurrentVersion" $(MAXIMUM_ALLOWED) KeyNt
  455.     Ifstr(i) $(KeyNt) != ""
  456.         GetRegValue $(KeyNt) "CurrentVersion" CurVerValue
  457.         Set CurVer = *($(CurVerValue),4)
  458.         Debug-Output "OEMSETUP.INF: NT Version is "$(CurVer)
  459.         CloseRegKey $(KeyNt)
  460.     Endif
  461.  
  462.     Ifstr(i) $(CurVer) == ""
  463.       Debug-Output "OEMSETUP.INF: Set BusNumber = 0 "
  464.       Set BusNumber = 0
  465.     Else
  466.       Ifstr(i) $(CurVer) == "3.1"
  467.         Debug-Output "OEMSETUP.INF: Set BusNumber = 0 "
  468.         Set BusNumber = 0
  469.       else
  470.         Debug-Output "OEMSETUP.INF: Shell out for BusNumber"
  471.         Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusTypeNum) $(BusNumber)
  472.       endif
  473.     Endif
  474.  
  475. ;    set MemoryMapValue = *($(MemoryMapValues), ~($(MemoryMapList),$(MemoryMapIndex)))
  476.  
  477.     set IRQValue = *($(IRQValues), ~($(IRQList),$(IRQValueIndex)))
  478.  
  479.     set IOBaseAddrValue = *($(IOBaseAddrValues), ~($(IOBaseAddrList),$(IOBaseAddrIndex)))
  480.  
  481. ;AdapterType: 0=ISA, 1=EISA, 2=MCA, 3=PCI
  482.     Set NewValueList = {{InterruptNumber,$(NoTitle),$(!REG_VT_DWORD),$(IRQValue)},+
  483.                        {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusTypeNum)},+
  484.                        {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  485.                        {AdapterType,$(NoTitle),$(!REG_VT_DWORD),0},+
  486.                        {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  487. ;                       {MemoryMappedBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(MemoryMapValue)},+
  488.                        {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  489.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  490.     CloseRegKey $(KeyParameters)
  491.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  492.         Debug-Output "ShellCode error."
  493.         goto ShellCodeError
  494.     endif
  495.     set RegistryErrorIndex = $($R0)
  496.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  497.         Debug-Output "Registry error: Add value list"
  498.         goto fatalregistry
  499.     endif
  500.     EndWait
  501.     goto successful
  502. bindingadapter =+
  503.     set Error = "Binding: Sorry, not yet implemented."
  504.     goto fatal
  505. removeadapter = +
  506.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  507.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  508.             $(ProductSoftwareName)
  509.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  510.             Debug-Output "ShellCode error"
  511.             goto ShellCodeError
  512.         endif
  513.         set RegistryErrorIndex = $($R0)
  514.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  515.             goto fatalregistry
  516.         endif
  517.     else
  518.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  519.             $(ProductSoftwareName), $(!NTN_RegBase)
  520.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  521.             Debug-Output "ShellCode error"
  522.             goto ShellCodeError
  523.         endif
  524.         set RegistryErrorIndex = $($R0)
  525.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  526.             goto fatalregistry
  527.         endif
  528.     endif
  529.     goto end
  530. UpgradeSoftware = +
  531.     ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  532.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  533.         Ifstr $(KeyProduct) != $(KeyNull)
  534.             GetRegValue $(KeyProduct),"MajorVersion", VersionInfo
  535.             set Version = *($(VersionInfo), 4)
  536.             Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  537.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  538.                 Debug-Output "ShellCode error"
  539.                 goto ShellCodeError
  540.             endif
  541.             set !UG_Filename = $($R0)
  542.             ifstr(i) $(!UG_Filename) != ""
  543.                 install "Install-Update"
  544.                 ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  545.                     goto fatal
  546.                 endif
  547.             endif
  548.             SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  549.             SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  550.             ifint $(Version) != $(ProductVersion)
  551.             endif
  552.             CloseRegKey $(KeyProduct)
  553.         else
  554.             goto fatalregistry
  555.         endif
  556.     else
  557.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) +
  558.               $(MAXIMUM_ALLOWED) NetworkCardKey
  559.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  560.             GetRegValue $(NetworkCardKey),"ServiceName", ServiceNameInfo
  561.             set ServiceName = *($(ServiceNameInfo), 4)
  562.             OpenRegKey $(NetworkCardKey) "" "NetRules" +
  563.                 $(MAXIMUM_ALLOWED) NetRuleKey
  564.             Ifstr(i) $(NetRuleKey) != $(KeyNull)
  565.             else
  566.                 goto fatalregistry
  567.             endif
  568.             CloseRegKey $(NetRules)
  569.             CloseRegKey $(NetworkCardKey)
  570.         else
  571.             goto fatalregistry
  572.         endif
  573.         OpenRegKey $(!REG_H_LOCAL) "" +
  574.               $(!NTN_ServiceBase)"\"$(ServiceName) +
  575.               $(MAXIMUM_ALLOWED) ServiceKey
  576.         Ifstr(i) $(ServiceKey) != $(KeyNull)
  577.             CloseRegKey $(ServiceKey)
  578.         else
  579.             goto fatalregistry
  580.         endif
  581.     endif
  582.     goto end
  583. successful = +
  584.     goto end
  585. abandon = +
  586.     ForListDo $(OEM_ABANDON_OPTIONS)
  587.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  588.             $(ProductSoftwareName), $($)
  589.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  590.             Debug-Output "ShellCode error"
  591.             goto ShellCodeError
  592.         endif
  593.         set RegistryErrorIndex = $($R0)
  594.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  595.             goto fatalregistry
  596.         endif
  597.     EndForListDo
  598.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  599.         Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  600.             $(ProductSoftwareName), FALSE
  601.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  602.             Debug-Output "ShellCode error"
  603.             goto ShellCodeError
  604.         endif
  605.         set RegistryErrorIndex = $($R0)
  606.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  607.             goto fatalregistry
  608.         endif
  609.     endif
  610.     goto end
  611. warning = +
  612.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  613.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  614.         goto ShellCodeError
  615.     endif
  616.     ifstr(i) $($R1) == "OK"
  617.         goto $(to)
  618.     else-ifstr(i) $($R1) == "CANCEL"
  619.         goto $(from)
  620.     else
  621.         goto "end"
  622.     endif
  623. nonfatalinfo = +
  624.     Set Severity = STATUS
  625.     Set CommonStatus = STATUS_USERCANCEL
  626.     goto nonfatalmsg
  627. nonfatal = +
  628.     Set Severity = NONFATAL
  629.     goto nonfatalmsg
  630. nonfatalmsg = +
  631.     ifstr(i) $(Error) == ""
  632.         Set Severity = NONFATAL
  633.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  634.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  635.             goto ShellCodeError
  636.         endif
  637.         set Error = $($R0)
  638.     endif
  639.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  640.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  641.         goto ShellCodeError
  642.     endif
  643.     ifstr(i) $($R1) == "OK"
  644.         goto $(from)
  645.     else
  646.         goto "end"
  647.     endif
  648. fatalregistry = +
  649.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  650.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  651.         goto ShellCodeError
  652.     endif
  653.     set Error = $($R0)
  654.     goto fatal
  655. fataldetect = +
  656.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  657.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  658.         Debug-Output "ShellCode error: cannot get an error string."
  659.         goto ShellCodeError
  660.     endif
  661.     set Error = $($R0)
  662.     Goto fatal
  663. fatal = +
  664.     ifstr(i) $(Error) == ""
  665.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  666.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  667.             goto ShellCodeError
  668.         endif
  669.         set Error = $($R0)
  670.     endif
  671.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  672.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  673.         goto ShellCodeError
  674.     endif
  675.     goto setfailed
  676. ShellCodeError = +
  677.     set DlgType      = "MessageBox"
  678.     set STF_MB_TITLE = "Error: "$(FunctionTitle)
  679.     set STF_MB_TEXT  = "Shell Code Error"
  680.     set STF_MB_TYPE  = 1
  681.     set STF_MB_ICON  = 3
  682.     set STF_MB_DEF   = 1
  683.     ui start "Error Message"
  684.     goto setfailed
  685. setfailed = +
  686.     set CommonStatus = STATUS_FAILED
  687.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  688.         set OEM_ABANDON_ON = FALSE
  689.         goto abandon
  690.     endif
  691.     goto end
  692. end = +
  693.     goto term
  694. term = +
  695.     Return $(CommonStatus)
  696. [DebugConfiguration]
  697.     Set InfName = "OEMSETUP.INF"
  698.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  699.     Debug-Output $(InfName)" IRQLevel is "$(!p:IRQValue)
  700.     Debug-Output $(InfName)" IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  701. ;    Debug-Output $(InfName)" MemoryMappedBaseAddr is "$(!p:MemoryMapValue)
  702.     return
  703. [Install-Option]
  704.     set STF_VITAL = ""
  705.     ifstr(i) $(AddCopy) == "YES"
  706.         AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  707.     endif
  708.     ifstr(i) $(DoCopy) == "YES"
  709.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  710.        CopyFilesInCopyList
  711.     endif
  712.     Exit
  713. [Install-Update]
  714.    set STF_VITAL        = ""
  715.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  716.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  717.    AddSectionFilesToCopyList Files-Inf $(SrcDir) $(!STF_WINDOWSSYSPATH)
  718.    set !STF_NCPA_FLUSH_COPYLIST = TRUE
  719.    CopyFilesInCopyList
  720.    exit
  721.  
  722. [Install-Dll]
  723.    set STF_VITAL        = ""
  724.    AddSectionFilesToCopyList Files-Dll $(!STF_SRCDIR) $(!STF_WINDOWSSYSPATH)
  725.    CopyFilesInCopyList
  726.    exit
  727.  
  728. [Source Media Descriptions]
  729.     ;1  = "HP Driver Support Disk"  , TAGFILE = disk1
  730.     1  = "Windows NT DRVLIB"
  731.  
  732. [Signature]
  733.     FileType = MICROSOFT_DRVLIB_FILE
  734. [GetSignature]
  735.     read-syms Signature
  736.     return $(FileType)
  737.  
  738. [ProductType]
  739. STF_PRODUCT  = Winnt
  740. STF_PLATFORM = I386
  741.  
  742. [Files-Inf]
  743. 1,    oemsetup.inf,     SIZE=39691,    RENAME=$(!UG_Filename)
  744.  
  745. [Files-J2573A]
  746. 1, hpddnd3.sys , SIZE=53248
  747.  
  748. [Files-Dll]
  749. 1, Hpvgdlg.dll,  SIZE=14336
  750.  
  751. [LanguagesSupported]
  752.     ENG
  753.  
  754. [OptionsTextENG]
  755.     J2573A = "HP DeskDirect (J2573A) 10/100 ISA LAN Adapter"
  756.  
  757. [FileConstantsENG]
  758. ProCaption   = "Windows NT Setup"
  759. ProCancel    = "Cancel"
  760. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  761.                "Are you sure you want to cancel copying files?"
  762. ProCancelCap = "Network Setup Message"
  763. ProText1     = "Copying:"
  764. ProText2     = "To:"
  765.  
  766. J2573AFunctionTitle    = "HP DeskDirect 10/100 LAN Adapter Setup"
  767. ProductSoftwareDescription = "HP DeskDirect 10/100 LAN Adapter Driver"
  768. ProductHardwareJ2573ADescription = "HP DeskDirect (J2573A) 10/100 ISA LAN Adapter"
  769. FunctionTitle   = $($(Option)FunctionTitle)
  770. IRQList  = ^($(Option)IRQChoices, 1)
  771. IRQValues = ^($(Option)IRQChoices, 2)
  772. IOBaseAddrList = ^($(Option)IOBaseAddrChoices, 1)
  773. IOBaseAddrValues = ^($(Option)IOBaseAddrChoices, 2)
  774. ;MemoryMapList = ^($(Option)MemoryMapChoices,1)
  775. ;MemoryMapValues = ^($(Option)MemoryMapChoices,2)
  776. J2573AIRQDefault = 1
  777. J2573AIOBaseAddrDefault = 9
  778. ;J2573AMemoryMapDefault = 1
  779. [DialogConstantsENG]
  780. Help        = "&Help"
  781. Exit        = "Cancel"
  782. OK          = "OK"
  783. HelpContext = ""
  784. Continue    = "Continue"
  785. Cancel      = "Cancel"
  786. [FileDependentDlgENG]
  787. DlgType = "RadioCombination"
  788. DlgTemplate = "HPVG"
  789. Caption = $(FunctionTitle)
  790. DlgText = "Please select values for the following fields:"
  791. Combo1Label = "Interrupt Channel:"
  792. Combo2Label = "Base I/O Address:"
  793. ;Combo3Label = "Base Memory Address:"
  794. Combo1List = $(IRQList)
  795. Combo1Out  = $(IRQValue)
  796. Combo2List = $(IOBaseAddrList)
  797. Combo2Out  = $(IOBaseAddrValue)
  798. ;Combo3List = $(MemoryMapList)
  799. ;Combo3Out  = $(MemoryMapValue)
  800. ComboListItemsIn  = {Combo1List, Combo2List}
  801. ComboListItemsOut = {Combo1Out, Combo2Out}
  802. ;ComboListItemsIn  = {Combo1List, Combo2List, Combo3List}
  803. ;ComboListItemsOut = {Combo1Out, Combo2Out, Combo3Out}
  804. EditTextIn = ""
  805. EditTextLim = ""
  806. CBOptionsGreyed = {}
  807. NotifyFields = {NO, NO}
  808. [J2573AIRQChoices]
  809. IRQ_1 = "3",3
  810. IRQ_2 = "4",4
  811. IRQ_3 = "5",5
  812. IRQ_4 = "6",6
  813. IRQ_5 = "7",7
  814. IRQ_6 = "9",9
  815. IRQ_7 = "10",10
  816. IRQ_8 = "11",11
  817. IRQ_9 = "12",12
  818. IRQ_10 = "15",15
  819. [J2573AIOBaseAddrChoices]
  820. IOBase_1  = "0x100",256
  821. IOBase_2  = "0x140",320
  822. IOBase_3  = "0x180",384
  823. IOBase_4  = "0x1c0",448
  824. IOBase_5  = "0x200",512
  825. IOBase_6  = "0x240",576
  826. IOBase_7  = "0x280",640
  827. IOBase_8  = "0x2c0",704
  828. IOBase_9  = "0x300",768
  829. IOBase_10  = "0x340",832
  830. IOBase_11  = "0x380",896
  831. [J2573AMemoryMapChoices]
  832. MemoryMap_1 = "I/O Mode",0
  833. MemoryMap_2 = "0xC8000",819200
  834. MemoryMap_3 = "0xCC000",835584
  835. MemoryMap_4 = "0xD0000",851968
  836. MemoryMap_5 = "0xD4000",868352
  837. MemoryMap_6 = "0xD8000",884736
  838. MemoryMap_7 = "0xDC000",901120
  839. MemoryMap_8 = "0xE0000",917504
  840. MemoryMap_9 = "0xE4000",933888
  841. MemoryMap_10 = "0xE8000",950272
  842. MemoryMap_11 = "0xEC000",966656
  843.